package top.fangw.admin.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.fangw.admin.service.ISysRoleJoinMenuService;
import top.fangw.common.api.vo.InitRoleJoinMenu;
import top.fangw.common.core.result.Result;

/**
 * <p>
 * 用途：角色与菜单的关联关系表 前端控制器
 * </p>
 *
 * @author fangw
 * @since 2024-03-02
 */
@Tag(name = "菜单与角色的关联关系")
@RestController
@RequestMapping("/sys-role-join-menu")
@RequiredArgsConstructor
public class SysRoleJoinMenuController {

    private final ISysRoleJoinMenuService sysRoleJoinMenuService;


    @Operation(summary = "初始化菜单与角色的关联关系")
    @PostMapping("/initRoleJoinMenu")
    public Result<?> initRoleJoinMenu(@RequestBody InitRoleJoinMenu initRoleJoinMenuVo){
        sysRoleJoinMenuService.initUserJoinMenu(initRoleJoinMenuVo);
        return Result.success();
    }


}
